<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  	<%@ include file="../main.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<base href="basePath">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	
    <style type="text/css">
    	#titled
    	{
    		padding:20px;
    		font-size:40px;
    		font-weight:bold;
    		color:green;
    		text-align:center;
    	}
    	#area
    	{
    		margin-top: 1.17647059em;
		    background-color: #FFFFFF;
		    overflow: hidden;
		    position: relative;
		    padding: 10px 15px;
		    height:320px;
		    
		    -webkit-box-align: center;
		    align-items: center;
		    display: block;
		    border: 0;
		    resize: none;
		    color: inherit;
		    font-size: 1em;
		    line-height: inherit;
		    outline: 0;
		   overflow :auto;
		   
    	}
    	.demo 
    	{
   			 margin:20px;
		}
		
		 
		.demo .article 
		{
		   
		    color:#FFF;
		    display:inline-block;
		    *display:inline; zoom:1;
		    padding:5px 10px;
		    border:1px solid #3079ED;
		    background:#eee;
		    border-radius:5px;
		    background-color: #4D90FE;
		    background-image:-webkit-gradient(linear,left top,left bottom,from(#4D90FE),to(#4787ED));
		    background-image:-webkit-linear-gradient(top,#4D90FE,#4787ED);
		    background-image:-moz-linear-gradient(center top , #4D90FE, #4787ED);
		    background-image:linear-gradient(top,#4D90FE,#4787ED);
		}
		 
		name
		{
			float:left;
		}
    </style>
<title>聊天室</title>
</head>
<body>
	
	
		<div class="weui-navbar">
                <div class="weui-navbar__item" id="num">
              
                </div>
                <div id="date" class="weui-navbar__item">
              
                </div>
         
       </div>
            <br/>
            <br/>
            
           
        
        <div id="area">
        	
        	
        </div>
        
        <div class="weui-cells weui-cells_form">
	        <div class="weui-cell">
	            <div class="weui-cell__bd">
	                <textarea class="weui-textarea" id="text"   <c:if test="${session_user.mode == 0 }">placeholder="你已被禁言" readonly="readonly"</c:if> rows="3"></textarea>
	            </div>
	            <br/>
	        </div>
        </div>
        
        <br/>
   
		<input type="button" value="发送" id="send" class="weui-btn weui-btn_plain-primary" >
		<input type="hidden" id="sessionid" value="${session_user.id }">
     
	<script type="text/javascript">
			var mai = document.getElementById('area');
		   $(function()
		   {
			  
		      	$('#send').on('click',function(){
		    	  info();
		    	  $('#text').val("");
		    	  selectinfo();
		   		 });
		      	
		      	
		      	
		      	onliner();
		      	selectinfo();
		      	
			   $('#chatroom').addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
		   });
		  
		  
		   function date()
		   {
			   var date = new Date().toString().substr(16,8);
			   date = "时间:"+date;
			   $('#date').text(date);
		   }
		   window.setInterval("selectinfo();", 5000); 
		   window.setInterval("date();", 1000); 
	</script>
</body>
</html>
